import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.JTextField;
import org.rsbot.script.ScriptManifest;

public class BloddyMasterFarmerStealer$BloddyMasterFarmerGUI extends JFrame
{
  private static final long serialVersionUID = 1L;
  private JLabel label1;
  private JButton button2;
  private JButton button1;
  private JTabbedPane tabbedPane1;
  private JPanel panel1;
  private JLabel label2;
  private JLabel label5;
  private JLabel label6;
  private JCheckBox checkBox2;
  private JLabel label4;
  private JTextField textField1;
  private JLabel label3;
  private JPanel panel2;
  private JLabel label10;
  private JComboBox comboBox1;
  private JCheckBox checkBox1;
  private JTextField textField2;
  private JCheckBox checkBox3;
  private JLabel label7;
  private JLabel label8;
  private JLabel label9;
  private JTextField textField3;
  private JTextField textField4;
  private JTextField textField5;

  public BloddyMasterFarmerStealer$BloddyMasterFarmerGUI(BloddyMasterFarmerStealer paramBloddyMasterFarmerStealer)
  {
    initComponents();
  }

  private void button2ActionPerformed(ActionEvent paramActionEvent) {
    BloddyMasterFarmerStealer.access$902(this.this$0, false);
    BloddyMasterFarmerStealer.access$1002(this.this$0, true);
    dispose();
  }

  private void button1ActionPerformed(ActionEvent paramActionEvent) {
    BloddyMasterFarmerStealer.access$1102(this.this$0, Integer.parseInt(this.textField1.getText()));
    this.this$0.finishAt = this.checkBox3.isSelected();
    this.this$0.wantedHours = Integer.parseInt(this.textField3.getText());
    this.this$0.wantedMinutes = Integer.parseInt(this.textField4.getText());
    this.this$0.wantedSeconds = Integer.parseInt(this.textField5.getText());
    this.this$0.finishWhenLevel = this.checkBox1.isSelected();
    this.this$0.wantedLevel = Integer.parseInt(this.textField2.getText());
    BloddyMasterFarmerStealer.access$902(this.this$0, false);
    dispose();
  }

  private void checkBox2ActionPerformed(ActionEvent paramActionEvent) {
    if (this.checkBox2.isSelected())
      BloddyMasterFarmerStealer.access$1202(this.this$0, true);
    else
      BloddyMasterFarmerStealer.access$1202(this.this$0, false);
  }

  private void checkBox1ActionPerformed(ActionEvent paramActionEvent)
  {
    if (this.checkBox1.isSelected())
      this.textField2.setEnabled(true);
    else
      this.textField2.setEnabled(false);
  }

  private void checkBox3ActionPerformed(ActionEvent paramActionEvent)
  {
    if (this.checkBox3.isSelected()) {
      this.label7.setEnabled(true);
      this.label8.setEnabled(true);
      this.label9.setEnabled(true);
      this.textField3.setEnabled(true);
      this.textField4.setEnabled(true);
      this.textField5.setEnabled(true);
    } else {
      this.label7.setEnabled(false);
      this.label8.setEnabled(false);
      this.label9.setEnabled(false);
      this.textField3.setEnabled(false);
      this.textField4.setEnabled(false);
      this.textField5.setEnabled(false);
    }
  }

  private void comboBox1ActionPerformed(ActionEvent paramActionEvent) {
    if (this.comboBox1.getSelectedItem() == "Withdraw-10")
      BloddyMasterFarmerStealer.access$1302(this.this$0, true);
  }

  private void initComponents()
  {
    this.label1 = new JLabel();
    this.button2 = new JButton();
    this.button1 = new JButton();
    this.tabbedPane1 = new JTabbedPane();
    this.panel1 = new JPanel();
    this.label2 = new JLabel();
    this.label5 = new JLabel();
    this.label6 = new JLabel();
    this.checkBox2 = new JCheckBox();
    this.label4 = new JLabel();
    this.textField1 = new JTextField();
    this.label3 = new JLabel();
    this.label10 = new JLabel();
    this.comboBox1 = new JComboBox();
    this.panel2 = new JPanel();
    this.checkBox1 = new JCheckBox();
    this.textField2 = new JTextField();
    this.checkBox3 = new JCheckBox();
    this.label7 = new JLabel();
    this.label8 = new JLabel();
    this.label9 = new JLabel();
    this.textField3 = new JTextField();
    this.textField4 = new JTextField();
    this.textField5 = new JTextField();

    setResizable(false);
    setTitle("Bloddy Master Farmer Stealer GUI");
    Container localContainer = getContentPane();
    localContainer.setLayout(null);

    this.label1.setText("Bloddy Master Farmer Stealer " + this.this$0.properties.version());

    this.label1.setFont(new Font("Lucida Calligraphy", 1, 13));
    this.label1.setForeground(Color.red);
    localContainer.add(this.label1);
    this.label1.setBounds(new Rectangle(new Point(5, 10), this.label1.getPreferredSize()));

    this.button2.setText("Cancel");
    this.button2.addActionListener(new BloddyMasterFarmerStealer.BloddyMasterFarmerGUI.1(this));

    localContainer.add(this.button2);
    this.button2.setBounds(new Rectangle(new Point(140, 210), this.button2.getPreferredSize()));

    this.button1.setText("Start");
    this.button1.addActionListener(new BloddyMasterFarmerStealer.BloddyMasterFarmerGUI.2(this));

    localContainer.add(this.button1);
    this.button1.setBounds(210, 210, 58, this.button1.getPreferredSize().height);

    this.panel1.setLayout(null);

    this.label2.setText("Start in the draynor bank with all your seeds \n");

    this.label2.setFont(new Font("Comic Sans MS", 0, 11));
    this.panel1.add(this.label2);
    this.label2.setBounds(new Rectangle(new Point(5, 5), this.label2.getPreferredSize()));

    this.label5.setText("and food in one tab.");
    this.label5.setFont(new Font("Comic Sans MS", 0, 11));
    this.panel1.add(this.label5);
    this.label5.setBounds(new Rectangle(new Point(5, 25), this.label5.getPreferredSize()));

    this.label6.setText("Also make sure you fill in the right food ID.");

    this.label6.setFont(new Font("Comic Sans MS", 0, 11));
    this.panel1.add(this.label6);
    this.label6.setBounds(new Rectangle(new Point(5, 45), this.label6.getPreferredSize()));

    this.checkBox2.setText("Drop junkseeds");
    this.checkBox2.setFont(new Font("Comic Sans MS", 0, 11));

    this.checkBox2.setSelected(true);
    this.checkBox2.addActionListener(new BloddyMasterFarmerStealer.BloddyMasterFarmerGUI.3(this));

    this.panel1.add(this.checkBox2);
    this.checkBox2.setBounds(new Rectangle(new Point(3, 60), this.checkBox2.getPreferredSize()));

    this.label4.setText("Food ID*:");
    this.label4.setFont(new Font("Comic Sans MS", 0, 11));
    this.panel1.add(this.label4);
    this.label4.setBounds(5, 100, 265, 18);

    this.textField1.setText("7946");
    this.panel1.add(this.textField1);
    this.textField1.setBounds(140, 100, 90, this.textField1.getPreferredSize().height);

    this.label3.setText("*In RSBot client go to: view > inventory");
    this.label3.setFont(this.label3.getFont().deriveFont(this.label3.getFont().getStyle() | 0x2, this.label3.getFont().getSize() - 2.0F));

    this.panel1.add(this.label3);
    this.label3.setBounds(new Rectangle(new Point(10, 125), this.label3.getPreferredSize()));

    this.label10.setText("Withdraw food:");
    this.label10.setFont(new Font("Comic Sans MS", 0, 11));
    this.panel1.add(this.label10);
    this.label10.setBounds(new Rectangle(new Point(4, 85), this.label10.getPreferredSize()));

    this.comboBox1.setModel(new DefaultComboBoxModel(new String[] { "Withdraw-5", "Withdraw-10" }));

    this.comboBox1.addActionListener(new BloddyMasterFarmerStealer.BloddyMasterFarmerGUI.4(this));

    this.panel1.add(this.comboBox1);
    this.comboBox1.setBounds(140, 80, 90, this.comboBox1.getPreferredSize().height);

    Dimension localDimension = new Dimension();
    Rectangle localRectangle;
    for (int i = 0; i < this.panel1.getComponentCount(); i++) {
      localRectangle = this.panel1.getComponent(i).getBounds();

      localDimension.width = Math.max(localRectangle.x + localRectangle.width, localDimension.width);

      localDimension.height = Math.max(localRectangle.y + localRectangle.height, localDimension.height);
    }

    Insets localInsets1 = this.panel1.getInsets();
    localDimension.width += localInsets1.right;
    localDimension.height += localInsets1.bottom;
    this.panel1.setMinimumSize(localDimension);
    this.panel1.setPreferredSize(localDimension);

    this.tabbedPane1.addTab("Main", this.panel1);

    this.panel2.setLayout(null);

    this.checkBox1.setText("When reached level:");
    this.checkBox1.addActionListener(new BloddyMasterFarmerStealer.BloddyMasterFarmerGUI.5(this));

    this.panel2.add(this.checkBox1);
    this.checkBox1.setBounds(new Rectangle(new Point(5, 10), this.checkBox1.getPreferredSize()));

    this.textField2.setText("0");
    this.textField2.setEnabled(false);
    this.panel2.add(this.textField2);
    this.textField2.setBounds(140, 12, 40, this.textField2.getPreferredSize().height);

    this.checkBox3.setText("After:");
    this.checkBox3.addActionListener(new BloddyMasterFarmerStealer.BloddyMasterFarmerGUI.6(this));

    this.panel2.add(this.checkBox3);
    this.checkBox3.setBounds(new Rectangle(new Point(5, 45), this.checkBox3.getPreferredSize()));

    this.label7.setText("H:");
    this.label7.setEnabled(false);
    this.panel2.add(this.label7);
    this.label7.setBounds(new Rectangle(new Point(30, 75), this.label7.getPreferredSize()));

    this.label8.setText("M:");
    this.label8.setEnabled(false);
    this.panel2.add(this.label8);
    this.label8.setBounds(new Rectangle(new Point(95, 75), this.label8.getPreferredSize()));

    this.label9.setText("S:");
    this.label9.setEnabled(false);
    this.panel2.add(this.label9);
    this.label9.setBounds(new Rectangle(new Point(165, 75), this.label9.getPreferredSize()));

    this.textField3.setEnabled(false);
    this.textField3.setText("0");
    this.panel2.add(this.textField3);
    this.textField3.setBounds(50, 74, 30, this.textField3.getPreferredSize().height);

    this.textField4.setEnabled(false);
    this.textField4.setText("0");
    this.panel2.add(this.textField4);
    this.textField4.setBounds(115, 74, 30, 20);

    this.textField5.setEnabled(false);
    this.textField5.setText("0");
    this.panel2.add(this.textField5);
    this.textField5.setBounds(185, 74, 30, 20);

    localDimension = new Dimension();
    for (int j = 0; j < this.panel2.getComponentCount(); j++) {
      localRectangle = this.panel2.getComponent(j).getBounds();

      localDimension.width = Math.max(localRectangle.x + localRectangle.width, localDimension.width);

      localDimension.height = Math.max(localRectangle.y + localRectangle.height, localDimension.height);
    }

    Insets localInsets2 = this.panel2.getInsets();
    localDimension.width += localInsets2.right;
    localDimension.height += localInsets2.bottom;
    this.panel2.setMinimumSize(localDimension);
    this.panel2.setPreferredSize(localDimension);

    this.tabbedPane1.addTab("On Finish", this.panel2);

    localContainer.add(this.tabbedPane1);
    this.tabbedPane1.setBounds(5, 35, 265, 170);

    localContainer.setPreferredSize(new Dimension(290, 270));
    setSize(290, 270);
    setLocationRelativeTo(getOwner());
  }
}